<template>
	<view>
		<view class="courser_title">
			图片教程：
		</view>
		<view class="img_box">
			<image class="course" :src="taskCourse.detail_img_url" mode="" @tap="preImg"></image>
		</view>
		<view class="courser_title">
			视频教程：
		</view>
		<view class="video_box">
			 <video id="myVideo" :src="taskCourse.video_url"
			 :danmu-btn="false" controls></video>
		</view>
	</view>
</template>

<script>
	import request from "../../apiRequest/request.js"
	export default {
		data() {
			return {
				taskCourse: {}
			}
		},
		onLoad() {
			let currentTask = uni.getStorageSync('currentTask');
			request.tutorial(currentTask.id).then(res=>{
				this.taskCourse = res.data[0]
			})
		},
		methods: {
			preImg(){
				uni.previewImage({
					urls: [this.taskCourse.detail_img_url]
				})
			}
		}
	}
</script>

<style>
.img_box{
	width: 100%;
	text-align: center;
}
.course_img{
	width: 100%;
	object-fit: cover;
}
.video_box{
	width: 100%;
	text-align: center;
}
.courser_title{
	padding-top: 20rpx;
	font-size: 28rpx;
	padding-left: 20rpx;
	margin-bottom: 40rpx;
}
</style>
